Parallel Algorithm for Generating Permutations on Linear Array

نویسنده

  • Chau-Jy Lin
چکیده

Given n items, a parallel algorithm for generating the n! permutations is presented. This algorithm is designed to run on a linear array consisting of n identical processing elements (PEs for short). These PEs are numbered and referred to as PE(i) for 1 < i < n. Each PE is responsible for producing one component of each permutation. Every PE(i) contains six registers, namely: C(i), T(i), K(i), Y(i), Z(i) and X(i). A permutation takes constant time from the preceding one. For generating the required n ! permutations, our algorithm requires n! + n 1 time steps in which n 1 initial time steps are included. Here, a time step is defined as the maximal elapsed time (considering all PEs) to do the following three tasks: (1) PI!.(i) receives two data from PE(i + 1); (2) PE( i) executes the design algorithm once; (3) PE( i) sends the i th component of a certain permutation to output terminal. This ith component is stored in the register C(i). In the literature, there are many methods used to produce the n! permutations sequentially, e.g. the methods of lexicographic order, inversion vectors, rotations, minimal changes, random generations, and by reversing a certain suffix of current permutation, see [6,7]. A parallel algorithm is given in [2] to generate the permutations. However, this algorithm is not optimal (in the sense that the number of PE times the time complexity does not match the optimal sequential running time) and each PE needs a stack of size n. The parallel algorithm in [l] uses an arbitrary number of independent PEs, each producing a part of consecutive permutations. This algorithm is optimal, but each PE requires storage size O(n) and has to deal with large integers. The parallel algorithm in [3] running on a SIMD computer is complicated because it requires a table to handle a binary tree. An efficient parallel algorithm for generating all the n! permutations is presented in [5] which is executed on vector processors. This algorithm requires a large memory size. In contrast, our algorithm requires O(n!) time steps and runs on a linear array in which each PE contains only constant storage size and the elapsed time of a time step is independent of n.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Optimal Self { Routing of Linear - Complement Permutations in Hypercubes 1

Optimal Self{Routing of Linear-Complement Permutations in Hypercubes1 Rajendra Boppana and C. S. Raghavendra Dept. of Electrical Engineering{Systems University of Southern California, Los Angeles, CA 90089{0781 Abstract In this paper we describe an algorithm to route the class of linear-complement permutations on Hypercube SIMD computers. The class of linearcomplement permutations are extremely...

متن کامل

Optimal Self Routing of Linear Complement Permutations in Hypercubes

In this paper we describe an algorithm to route the class of linear complement permutations on Hy percube SIMD computers The class of linear complement permutations are extremely useful in de vising storage schemes for parallel array access The proposed algorithm is self routing and minimal that is the path established by the algorithm between each pair of source and destination processors is v...

متن کامل

Probability Generating Functions for Sattolo’s Algorithm

In 1986 S. Sattolo introduced a simple algorithm for uniform random generation of cyclic permutations on a fixed number of symbols. Recently, H. Prodinger analysed two important random variables associated with the algorithm, and found their mean and variance. H. Mahmoud extended Prodinger’s analysis by finding limit laws for the same two random variables.The present article, starting from the ...

متن کامل

Generating n-Ary Reflected Gray Codes on a Linear Array of Processors

We present a cost-optimal parallel algorithm for generating z-ary reflected Gray codes, i.e. variations of rz elements out of {41,..., n-ll in a Gray code order. It uses a linear anay of m processors, each having constant size memory and each being responsible for producing one part of a given variation. The algorithm is simple and uses a weaker model of computation than a recently published al...

متن کامل

Parallel Generation of t-ary Trees

A parallel algorithm for generating t-ary tree sequences in reverse B-order is presented. The algorithm generates t-ary trees by 0-1 sequences, and each 0-1 sequences is generated in constant average time O(1). The algorithm is executed on a CREW SM SIMD model, and is adaptive and cost-optimal. Prior to the discussion of the parallel algorithm a new sequential generation with O(1) average time ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:
  • Inf. Process. Lett.

دوره 35  شماره 

صفحات  -

تاریخ انتشار 1990